﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewsDetail.ascx.cs" Inherits="Controls_NewsDetail" %>

<%@ Register Assembly="CollectionPager" Namespace="SiteUtils" TagPrefix="cc1" %>

<link href="../css/stylesheet.css" rel="stylesheet" type="text/css" />


  <asp:FormView runat="server" ID="frvNewDetail">     
    <ItemTemplate>
        <table>
            <tr>
                <td align="center">                    
                
                    <asp:Label ID="News_NameLabel" runat="server" CssClass="gia" Font-Size="14px" 
                        Text='<%# Eval("News_Title") %>'></asp:Label>

                </td>
            </tr>
            
            <tr>
                <td align="left">
                    <br />
                    <asp:Label ID="Pro_ContentLabel" runat="server" CssClass="content" 
                        Font-Bold="True" Font-Size="12px" Text='<%# Eval("News_Intro") %>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="height: 21px;">
                    &nbsp;
                    <asp:Label ID="mieuta" runat="server" 
                Text='<%# Eval("News_Content") %>'  CssClass="content"></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="left">
                    <p style="text-align: left">
                        &nbsp; 
                        </p>
                    <p style="text-align: left">
                        <strong>
                        <asp:Label ID="Label1" runat="server" CssClass="xemthem" Font-Size="11px" 
                            Text='<%# Eval("News_CreateDate","Ngày viết : {0}") %>'></asp:Label>
                        |
                        <asp:Label ID="Label2" runat="server" CssClass="xemthem" Font-Size="11px" 
                            Text='<%# Eval("News_Source","Nguồn: {0}") %>'></asp:Label>
                        |
                        <asp:Label ID="Label3" runat="server" CssClass="xemthem" Font-Size="11px" 
                            Text='<%# Eval("News_Hit","Lượt xem: {0}") %>'></asp:Label>
                        </strong>
                    </p>
                </td>
            </tr>
            <tr>
                <td align="center" style="height: 10px">
                    <hr /></td>
            </tr>
            <tr>
                <td align="center" style="height: 10px">
                   
                </td>
            </tr>
        </table>
    </ItemTemplate>
     </asp:FormView>
     <span class="content">Tin khác :</span> 
<asp:DataList ID="dtlOthersNews" runat="server">
    <ItemTemplate>
        <table>
            <tr>
                <td style="width: 443px; font-size:12px;">
                    &nbsp;<img src="images/ico/hrm_05.png" style="width: 15px; height: 15px" />
                    <a href ='Noidung.aspx?IDNew=<%# Eval("News_ID") %>' style="text-decoration:none;color:Black;">
                        <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("News_Title") %>' CssClass="content"></asp:Label>
                    </a>
                    </td>
            </tr>            
        </table>
    </ItemTemplate>
</asp:DataList>
<cc1:CollectionPager ID="CollectionPager1" runat="server" 
FirstText="Trang đầu" LastText="Trang cuối" PageSize="15" ResultsFormat="Kết qyả hiển thị {0}-{1} (of {2})">
</cc1:CollectionPager>
<p>
    &nbsp;</p>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
    DeleteCommand="DELETE FROM [News] WHERE [News_ID] = @News_ID" 
    InsertCommand="INSERT INTO [News] ([News_Hit]) VALUES (@News_Hit)" 
    SelectCommand="SELECT [News_ID], [News_Hit] FROM [News]" 
    UpdateCommand="UPDATE [News] SET [News_Hit] = @News_Hit WHERE [News_ID] = @News_ID">
    <DeleteParameters>
        <asp:Parameter Name="News_ID" Type="Int32" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="News_Hit" Type="Int32" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="News_Hit" Type="Int32" />
        <asp:Parameter Name="News_ID" Type="Int32" />
    </UpdateParameters>
</asp:SqlDataSource>
